package com.iplant.pdm.service.po.fpc;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.iplant.base.po.BasePO;
import com.iplant.base.po.enums.DBSchemas;
import com.iplant.base.utils.annotation.po.DBBasePO;
import com.iplant.base.utils.annotation.condition.DBCondition;
import com.iplant.base.utils.annotation.field.DBField;
import com.iplant.base.utils.annotation.join.DBJoin;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 产品基本信息
 *
 * @author YouWang·Peng
 * 2023-7-20 09:59:47
 */
@DBBasePO(TableName = "fpc_product", CheckName = {"Code"}, Schemas =
        DBSchemas.PDM,Cache = true)
public class FPCProduct extends BasePO implements Serializable {
    private static final long serialVersionUID = 1L;

    @DBField
    @DBCondition
    public int MaterialID = 0;//物料ID
    @DBCondition(CompareType = DBCondition.DBCompareType.like)
    @DBJoin(name = "Code", tableName = "mss_material", tableAsName = "m1", Schemas = DBSchemas.Basic,
            MainTableField = "MaterialID")
    public String MaterialNo = "";//物料编码
    @DBCondition(CompareType = DBCondition.DBCompareType.like)
    @DBJoin(name = "Name", tableName = "mss_material", tableAsName = "m1", Schemas = DBSchemas.Basic,
            MainTableField = "MaterialID")
    public String MaterialName = "";//物料名称

    /**
     * 产品编码简码
     */
    @DBCondition(CompareType = DBCondition.DBCompareType.like, ParamName2 = "SimplifiedCodeEQ")
    @DBField
    public String SimplifiedCode = "";

    /**
     * 元件数量
     */
    @DBField
    public int ComponentNumber = 1;
    @DBField
    public String DrawingNo = "";
    @DBField
    public String ProductSpec = "";//产品规格
    @DBField
    @DBCondition
    public int ProductTypeID = 0;//产品类型ID
    @DBJoin(name = "Code", tableName = "fpc_producttype", tableAsName = "f1", Schemas = DBSchemas.PDM,
            MainTableField = "ProductTypeID")
    public String ProductTypeCode = "";//产品类型编码
    @DBJoin(name = "Name", tableName = "fpc_producttype", tableAsName = "f1", Schemas = DBSchemas.PDM,
            MainTableField = "ProductTypeID")
    public String ProductTypeName = "";//产品类型名称
    @DBField
    @DBCondition
    public int ProductGroupID = 0;//产品组ID
    @DBJoin(name = "Name", tableName = "fpc_productgroup", tableAsName = "f2", Schemas = DBSchemas.PDM,
            MainTableField = "ProductGroupID")
    public String ProductGroupName = "";//产品组名称
    @DBJoin(name = "Code", tableName = "fpc_productgroup", tableAsName = "f2", Schemas = DBSchemas.PDM,
            MainTableField = "ProductGroupID")
    public String ProductGroupCode = "";//产品组编码


    public List<FPCProductParameter> ProductParameterList = new ArrayList<>();

    @JsonProperty("MaterialID")
    public int getMaterialID() {
        return MaterialID;
    }

    public void setMaterialID(int materialID) {
        MaterialID = materialID;
    }

    @JsonProperty("MaterialNo")
    public String getMaterialNo() {
        return MaterialNo;
    }

    public void setMaterialNo(String materialNo) {
        MaterialNo = materialNo;
    }

    @JsonProperty("MaterialName")
    public String getMaterialName() {
        return MaterialName;
    }

    public void setMaterialName(String materialName) {
        MaterialName = materialName;
    }

    @JsonProperty("DrawingNo")
    public String getDrawingNo() {
        return DrawingNo;
    }

    public void setDrawingNo(String drawingNo) {
        DrawingNo = drawingNo;
    }

    @JsonProperty("ProductSpec")
    public String getProductSpec() {
        return ProductSpec;
    }

    public void setProductSpec(String productSpec) {
        ProductSpec = productSpec;
    }

    @JsonProperty("ProductTypeID")
    public int getProductTypeID() {
        return ProductTypeID;
    }

    public void setProductTypeID(int productTypeID) {
        ProductTypeID = productTypeID;
    }

    @JsonProperty("ProductTypeCode")
    public String getProductTypeCode() {
        return ProductTypeCode;
    }

    public void setProductTypeCode(String productTypeCode) {
        ProductTypeCode = productTypeCode;
    }

    @JsonProperty("ProductTypeName")
    public String getProductTypeName() {
        return ProductTypeName;
    }

    public void setProductTypeName(String productTypeName) {
        ProductTypeName = productTypeName;
    }

    @JsonProperty("ProductGroupID")
    public int getProductGroupID() {
        return ProductGroupID;
    }

    public void setProductGroupID(int productGroupID) {
        ProductGroupID = productGroupID;
    }

    @JsonProperty("ProductGroupName")
    public String getProductGroupName() {
        return ProductGroupName;
    }

    public void setProductGroupName(String productGroupName) {
        ProductGroupName = productGroupName;
    }

    @JsonProperty("ProductGroupCode")
    public String getProductGroupCode() {
        return ProductGroupCode;
    }

    public void setProductGroupCode(String productGroupCode) {
        ProductGroupCode = productGroupCode;
    }

    @JsonProperty("ComponentNumber")
    public int getComponentNumber() {
        return ComponentNumber;
    }

    public void setComponentNumber(int componentNumber) {
        ComponentNumber = componentNumber;
    }

    @JsonProperty("ProductParameterList")
    public List<FPCProductParameter> getProductParameterList() {
        return ProductParameterList;
    }

    public void setProductParameterList(List<FPCProductParameter> productParameterList) {
        ProductParameterList = productParameterList;
    }

    @JsonProperty("SimplifiedCode")
    public String getSimplifiedCode() {
        return SimplifiedCode;
    }

    public void setSimplifiedCode(String simplifiedCode) {
        SimplifiedCode = simplifiedCode;
    }
}
